package com.hqd.ch03.v51.boot.context.annotation;

import com.hqd.ch03.v51.core.type.AnnotationMetadata;
import com.hqd.ch03.v51.factory.support.BeanNameGenerator;
import com.hqd.ch03.v51.registry.BeanDefinitionRegistry;

/**
 * 导入bean的信息
 */
public interface ImportBeanDefinitionRegistrar {
    /**
     * 注册bean，定义名称生成器
     *
     * @param importingClassMetadata
     * @param registry
     * @param importBeanNameGenerator
     */
    default void registerBeanDefinitions(AnnotationMetadata importingClassMetadata, BeanDefinitionRegistry registry,
                                         BeanNameGenerator importBeanNameGenerator) {

        registerBeanDefinitions(importingClassMetadata, registry);
    }

    /**
     * 注册bean
     *
     * @param importingClassMetadata
     * @param registry
     */
    default void registerBeanDefinitions(AnnotationMetadata importingClassMetadata, BeanDefinitionRegistry registry) {
    }

}

